package com.joinway.framework.admin.core.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.joinway.framework.admin.bean.UserContext;
import com.joinway.framework.admin.bean.view.LoginRole;
import com.joinway.framework.admin.bean.view.UserOverviewView;
import com.joinway.framework.admin.core.bean.view.MenuListView;
import com.joinway.framework.admin.core.bean.view.TreeMenuView;
import com.joinway.framework.bean.view.View;
import com.joinway.framework.core.plugin.Plugin;

public interface IAdminService extends Plugin {

	public UserContext login(String name, String password, HttpServletRequest request) throws Exception;
	
	public TreeMenuView getNavigatorMenus(int userId) throws Exception;
	
	public TreeMenuView getRoleMenus(String roleId) throws Exception;
	
	public TreeMenuView getRoleList(int userId) throws Exception;
	
	public UserOverviewView getUserOverviewView(int userId) throws Exception;
	
	public View changePassword(String loginName, String oldPassword, String newPassword) throws Exception;
	
	public View updateProfile(int userId, String name, String email) throws Exception;
	
	public MenuListView getUserRoleMenuList(List<LoginRole> roles) throws Exception;
	
}
